`timescale 1ns / 1ps
//////////////////////////////////////////////////////////////////////////////////
// Company: 
// Engineer: 
// 
// Create Date:    19:54:59 04/21/2013 
// Design Name: 
// Module Name:    DEPPReaderWriter 
// Project Name: 
// Target Devices: 
// Tool versions: 
// Description: 
//
// Dependencies: 
//
// Revision: 
// Revision 0.01 - File Created
// Additional Comments: 
//
//////////////////////////////////////////////////////////////////////////////////
module DEPPReaderWriter(
    input clk,
	 input reset,
    input strobeA,
    input strobeD,
    input write,
    output wt,
    inout [7:0] DeppData,
    output [7:0] dataOut,
    output dataOutReady,
    input dataOutAck,
    input [7:0] dataIn,
    input dataInReady,
    output dataInAck
    );
	 
	 wire wtR;
	 DEPPReader myReader(clk, reset, strobeA & write, strobeD & write, wtR, DeppData, dataOut, dataOutReady, dataOutAck);
	 
	 wire wtW;
	 wire [7:0] busOut;
	 DEPPWriter myWriter(clk, reset, strobeA & ~write, strobeD & ~write, wtW, busOut, dataIn, dataInReady, dataInAck);
	 
	 assign wt = write ? wtR : wtW;
	 assign DeppData = ~write ? busOut : 8'hZZ;


endmodule
